Compare terminal Jepsen cursors with origin stream heads - #21
Open
jeregrine wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The terminal invariant accepted any nonnegative receiver cursor under current authority. A receiver at cursor 101 for an origin whose head was 1 could therefore report healthy, and a missing required cursor was invisible to that check.
Fix
Capture each origin's active epochs and fully applied per-shard stream heads independently, alongside every receiver cursor and its actual lane. The independent checker derives admitted streams from both sides' active clusters and requires exact terminal positions. Head-zero streams permit an absent cursor or a zero admission marker; stale, retired, wrong-lane and otherwise extra cursors are rejected, including extra zero cursors.
Stream evidence participates in terminal stability comparisons. Existing internal invariants remain in place, and snapshot clients collect evidence without adding cross-node calls to Group shards.
Supporting information
Terminal captures now require stream evidence; older histories cannot qualify without it. Generation and epoch references use opaque external-term encodings to retain identity across EDN transport.
Executable capture qualification uses three real Group nodes and the actual snapshot-to-EDN boundary, including the cursor-101/head-1 counterexample, missing required cursors, no-write streams, cluster closure, instance restart and retirement. It is separate from the Java-only pure checker and included in the normal Mix gate.